<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#di{
				width: 100px;
				height: 100px;
				background-color: red;
				margin-top: 10px;
			}
		</style>
		<script type="text/javascript">
			window.onload = function(){
				var but = document.getElementById('but');
				var di = document.getElementById('di');
				
				but.onclick = function(){
					var obj = getComputedStyle(di,null).width;
				}
			}
		</script>
	</head>
	<body>
		<button id="but">点击</button>
		<div id="di"></div>
	</body>
</html>
